package com.binvshe.binvshe.organization;

import android.app.Activity;
import android.graphics.Color;
import android.view.View;

import com.binvshe.binvshe.R;

/**
 * Created by Zoi.
 * E-mail：KyluZoi@gmail.com
 * 2016/9/22
 */

public class JumpWindowHelper {
    /**
     * 分享item
     *
     * @return
     */
    static private ShareItem addShareItem() {
        return new ShareItem("推荐", Color.WHITE, 0xff43549C);
    }

    /**
     * 删除item
     *
     * @return
     */
    static private ShareItem addDelete() {
        return new ShareItem("删除", Color.WHITE, 0xff43549C);
    }

    /**
     * 群设置 item
     *
     * @return
     */
    static private ShareItem ChangeInfo() {
        return new ShareItem("群设置", Color.WHITE, 0xff43549C);
    }

    /**
     * 退出社团 item
     *
     * @return
     */
    static private ShareItem exitClub() {
        return new ShareItem("退出社团", Color.WHITE, 0xff43549C);
    }

    /**
     * 通知管理 item
     *
     * @return
     */
    static private ShareItem messageManage() {
        return new ShareItem("消息管理", Color.WHITE, 0xff43549C);
    }

    /**
     * 成员的选择
     */
    static public void jumpMember(Activity activity, View viewParent) {
        new JumpWindowView.Builder(activity, viewParent)
                .addItem(addShareItem())
                .addItem(exitClub())
                .setBackgroundColor(activity.getResources().getColor(R.color.bg_black))
                .setItemDuration(200)
                .create();
    }

    /**
     * 管理员的选择
     */
    static public void jumpAdmin(Activity activity, View viewParent) {
        new JumpWindowView.Builder(activity, viewParent)
                .addItem(addShareItem())
                .addItem(ChangeInfo())
                .addItem(messageManage())
                .setBackgroundColor(activity.getResources().getColor(R.color.bg_black))
                .setItemDuration(200)
                .create();
    }

    /**
     * 非成员的选择
     */
    static public JumpWindowView.Builder jumpVisitor(Activity activity, View viewParent) {
        return new JumpWindowView.Builder(activity, viewParent)
                .addItem(addShareItem())
                .setBackgroundColor(activity.getResources().getColor(R.color.bg_black))
                .setItemDuration(200);
    }


    static public JumpWindowView.Builder jumpDelete(Activity activity, View viewParent) {
        return new JumpWindowView.Builder(activity, viewParent)
                .addItem(addDelete())
                .setBackgroundColor(activity.getResources().getColor(R.color.bg_black))
                .setItemDuration(200);
    }
    static public JumpWindowView.Builder jumpShare(Activity activity, View viewParent) {
        return new JumpWindowView.Builder(activity, viewParent)
                .addItem(addShareItem())
                .setBackgroundColor(activity.getResources().getColor(R.color.bg_black))
                .setItemDuration(200);
    }


}
